<template>
	<view>
		<view class="title">
			确定信息
		</view>
		<view class="info">
			<view class="item">
				<span style='padding-right: 5px;'>名称:</span><span>{{parm.roomName}}</span>
			</view>
			<view class="item">
				<span style='padding-right: 5px;'>楼层:</span><span>{{parm.floorName}}</span>
			</view>
			<view class="item">
				<span style='padding-right: 5px;'>座位:</span><span>{{parm.seatName}}</span>
			</view>
			<view class="item" style="margin-bottom: 10px;">
				<span style='padding-right: 5px;'>时间:</span><span>{{parm.orderTime}}</span>
			</view>
		</view>
		<view class="title">
			预约规则
		</view>
		<view class="info">
			<view class="item">1、预约时间到30分钟之内签到；</view>
			<view class="item">2、漏签到一次算一次违约；</view>
			<view class="item">3、漏签退一次算一次违约；</view>
			<view class="item">4、一个月内三次违约的不得预约座位；</view>
		</view>
		<view @click="selectSeatSave" class="mybtn">
			<uv-button color='#6ECEB0' type="primary" text="确定预约"></uv-button>
		</view>
	</view>
</template>

<script setup>
	import {
		onLoad
	} from '@dcloudio/uni-app'
	import {
		reactive
	} from 'vue';
	import {selectSeatSaveApi} from '../../api/index.js'
	const parm = reactive({})
	//提交
	const selectSeatSave = async()=>{
		let res = await selectSeatSaveApi(parm)
		if(res && res.code == 200){
			uni.navigateTo({
				url:'../order/order'
			})
		}
	}
	onLoad((option) => {
		const item = JSON.parse(option.item)
		console.log(item)
		Object.assign(parm, item)
	})
</script>
<style>
	page {
		background-color: #FFF;
	}
</style>
<style scoped lang="scss">
	.title {
		background-color: #f1f1f1;
		display: flex;
		justify-content: center;
		align-items: center;
		padding: 20rpx 0rpx;
	}

	.info {
		margin: 0px 20rpx;
		font-size: 28rpx;
		padding: 0px 10px;
		.item {
			margin-top: 10px;
		}
	}
	.mybtn{
		margin: 50px 20px 0px 20px;
	}
</style>
